package com.zhoug.zmui3.input;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;

import com.zhoug.common3.view.edit.ZMUIEditText;

import androidx.annotation.Nullable;

/**
 * 键值对输入框
 * @Author: zhoug
 * @Date: 2024-07-08
 * @Description:
 */
public class ZMUIInputEditText extends ZMUIInputTextView{
    public ZMUIInputEditText(Context context) {
        super(context);
    }

    public ZMUIInputEditText(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public ZMUIInputEditText(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected View createValueView(ViewGroup parent) {
        if(mValueView==null){
            mValueView = new ZMUIEditText(getContext());
            //去掉默认背景
            mValueView.setBackground(null);
            //去掉默认padding
            mValueView.setPadding(0, 0, 0, 0);
        }
        return mValueView;
    }



    @Override
    public ZMUIEditText getValueView() {
        return (ZMUIEditText) mValueView;
    }


}
